package com.lingyue.entity.module.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.lingyue.entity.groups.Modify;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author BaiJinjua
 * @since 2019-11-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("api_customer")
@ApiModel(value="ApiCustomerEntity对象", description="客户信息api")
public class ApiCustomerEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "API_CUS_ID", type = IdType.AUTO)
    @NotNull(groups = Modify.class)
    private Long id;

    @ApiModelProperty(value = "数据唯一值")
    @JsonProperty("unique_key")
    @TableField("API_CUS_UNIQUE_KEY")
    @NotBlank(message = "unique_key not be empty")
    private String uniqueKey;

    @ApiModelProperty(value = "经销商编号")
    @JsonProperty("dealer_id")
    @TableField("API_CUS_DEL_ID")
    @NotNull(message = "dealer_id not be empty")
    private Long delId;

    @ApiModelProperty(value = "客户编号")
    @JsonProperty("customer_id")
    @TableField("API_CUS_CUSTOMER_ID")
    @NotBlank(message = "customer_id not be empty")
    private String customerId;

    @ApiModelProperty(value = "同意使用数据：OPT_IN|OPT_OUT|UNKNOWN")
    @JsonProperty("data_privacy")
    @TableField("API_CUS_DATA_PRIVACY")
    @Pattern(regexp = "^OPT_IN|OPT_OUT|UNKNOWN$", message = "data_privacy is invalid")
    private String dataPrivacy;

    @ApiModelProperty(value = "拒绝所有联系：Y、N(默认)")
    @JsonProperty("refuse_contact")
    @TableField("API_CUS_REFUSE_CONTACT")
    private String refuseContact;

    @ApiModelProperty(value = "销售顾问姓名(称呼)")
    @JsonProperty("sales_consultant")
    @TableField("API_CUS_SA_NAME")
    private String saName;

    @ApiModelProperty(value = "客户姓名")
    @TableField("API_CUS_NAME")
    private String name;

    @ApiModelProperty(value = "性别: M:男生、F:女士")
    @TableField("API_CUS_GENDER")
    private String gender;

    @ApiModelProperty(value = "客户生日")
    @JsonProperty("birthday")
    @TableField("API_CUS_DOB")
    private LocalDate dob;

    @ApiModelProperty(value = "手机号")
    @TableField("API_CUS_MOBILE")
    //@NotBlank(message = "mobile not be empty")
    private String mobile;

    @ApiModelProperty(value = "城市")
    @TableField("API_CUS_CITY")
    private String city;

    @ApiModelProperty(value = "E-MAIL")
    @TableField("API_CUS_EMAIL")
    private String email;

    @ApiModelProperty(value = "公司")
    @JsonProperty("company_name")
    @TableField("API_CUS_COMPANY")
    private String company;

    @ApiModelProperty(value = "感兴趣车型")
    @JsonProperty("interested_models")
    @TableField("API_CUS_VEH_INTEREST")
    private String vehInterest;

    @ApiModelProperty(value = "学历行业")
    @JsonProperty("overall_comments")
    @TableField("API_CUS_OVERALL_COMMENTS")
    private String overallComments;

    @ApiModelProperty(value = "SFM stage code(NSP)  --销售漏斗")
    @JsonProperty("sales_funnel_stage")
    @TableField("API_CUS_SALES_FUNNEL_STAGE")
    private String salesFunnelStage;

    @ApiModelProperty(value = "SFM color code(NSP)  --销售漏斗")
    @JsonProperty("sales_funnel_leads_color")
    @TableField("API_CUS_SALES_FUNNEL_LEADS_COLOR")
    private String salesFunnelLeadsColor;

    @ApiModelProperty(value = "SFM Duration in days(NSP)  --销售漏斗")
    @JsonProperty("sales_funnel_duration")
    @TableField("API_CUS_SALES_FUNNEL_DURATION")
    private Integer salesFunnelDuration;

    @ApiModelProperty(value = "客户安全状态：S - Satisfied、N – Neutral、D – Dissatisfied")
    @JsonProperty("customer_satisfaction")
    @TableField("API_CUS_SATISFACTION")
    private String satisfaction;

    @ApiModelProperty(value = "Customer value # of cars")
    @JsonProperty("customer_value_no_of_car")
    @TableField("API_CUS_VALUE_NO_OF_CAR")
    private String valueNoOfCar;

    @ApiModelProperty(value = "试驾备注信息")
    @JsonProperty("td_comments")
    @TableField("API_CUS_TD_COMMENTS")
    private String tdComments;

    @ApiModelProperty(value = "May contain line break <BR> tags")
    @JsonProperty("open_complaints")
    @TableField("API_CUS_OPEN_COMPLAINTS")
    private String openComplaints;

    @ApiModelProperty(value = "P - private contact, C – company contact")
    @JsonProperty("partner_type")
    @TableField("API_CUS_PARTNER_TYPE")
    private String partnerType;

    /**
     * feat 20200330 baijinhua
     */
    @ApiModelProperty(value = "Bmw Blacklist")
    @JsonProperty("kr_block")
    @TableField("API_CUS_KR_BLOCK")
    @Pattern(regexp = "^$|Y|N$", message = "kr_block is invalid")
    private String krBlock;

    @ApiModelProperty(value = "数据处理状态（C-Create、U-Update）")
    @JsonProperty("handler_flag")
    @TableField("API_CUS_HANDLER_FLAG")
    private String handlerFlag;

    @TableField("API_CUS_RESERVE01")
    @JsonProperty("reserve_1")
    private String reserve01;

    @TableField("API_CUS_RESERVE02")
    @JsonProperty("reserve_2")
    private String reserve02;

    @TableField("API_CUS_RESERVE03")
    @JsonProperty("reserve_3")
    private String reserve03;

    @TableField("API_CUS_RESERVE04")
    @JsonProperty("reserve_4")
    private String reserve04;

    @TableField("API_CUS_RESERVE05")
    @JsonProperty("reserve_5")
    private String reserve05;

    @TableField("API_CUS_RESERVE06")
    @JsonProperty("reserve_6")
    private String reserve06;

    @TableField("API_CUS_RESERVE07")
    @JsonProperty("reserve_7")
    private String reserve07;

    @TableField("API_CUS_RESERVE08")
    @JsonProperty("reserve_8")
    private String reserve08;

    @TableField("API_CUS_RESERVE09")
    @JsonProperty("reserve_9")
    private String reserve09;

    @TableField("API_CUS_RESERVE10")
    @JsonProperty("reserve_10")
    private String reserve10;

    @ApiModelProperty(value = "数据来源")
    @TableField("API_CUS_DATA_SOURCE")
    private String dataSource;

    @ApiModelProperty(value = "请求流水号")
    @TableField("API_CUS_REQUEST_NO")
    private String requestNo;

    @TableField("API_CUS_CREATE_USER")
    private String createUser;

    @TableField("API_CUS_CREATE_DATE")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "消费状态：init-初始化、finished-完成")
    @TableField("API_CUS_CONSUME_FLAG")
    private String consumeFlag;


    public static final String API_CUS_ID = "API_CUS_ID";

    public static final String API_CUS_UNIQUE_KEY = "API_CUS_UNIQUE_KEY";

    public static final String API_CUS_DEL_ID = "API_CUS_DEL_ID";

    public static final String API_CUS_CUSTOMER_ID = "API_CUS_CUSTOMER_ID";

    public static final String API_CUS_DATA_PRIVACY = "API_CUS_DATA_PRIVACY";

    public static final String API_CUS_REFUSE_CONTACT = "API_CUS_REFUSE_CONTACT";

    public static final String API_CUS_SA_NAME = "API_CUS_SA_NAME";

    public static final String API_CUS_NAME = "API_CUS_NAME";

    public static final String API_CUS_GENDER = "API_CUS_GENDER";

    public static final String API_CUS_DOB = "API_CUS_DOB";

    public static final String API_CUS_MOBILE = "API_CUS_MOBILE";

    public static final String API_CUS_CITY = "API_CUS_CITY";

    public static final String API_CUS_EMAIL = "API_CUS_EMAIL";

    public static final String API_CUS_COMPANY = "API_CUS_COMPANY";

    public static final String API_CUS_VEH_INTEREST = "API_CUS_VEH_INTEREST";

    public static final String API_CUS_OVERALL_COMMENTS = "API_CUS_OVERALL_COMMENTS";

    public static final String API_CUS_SALES_FUNNEL_STAGE = "API_CUS_SALES_FUNNEL_STAGE";

    public static final String API_CUS_SALES_FUNNEL_LEADS_COLOR = "API_CUS_SALES_FUNNEL_LEADS_COLOR";

    public static final String API_CUS_SALES_FUNNEL_DURATION = "API_CUS_SALES_FUNNEL_DURATION";

    public static final String API_CUS_SATISFACTION = "API_CUS_SATISFACTION";

    public static final String API_CUS_VALUE_NO_OF_CAR = "API_CUS_VALUE_NO_OF_CAR";

    public static final String API_CUS_TD_COMMENTS = "API_CUS_TD_COMMENTS";

    public static final String API_CUS_OPEN_COMPLAINTS = "API_CUS_OPEN_COMPLAINTS";

    public static final String API_CUS_PARTNER_TYPE = "API_CUS_PARTNER_TYPE";

    public static final String API_CUS_KR_BLOCK = "API_CUS_KR_BLOCK";

    public static final String API_CUS_HANDLER_FLAG = "API_CUS_HANDLER_FLAG";

    public static final String API_CUS_RESERVE01 = "API_CUS_RESERVE01";

    public static final String API_CUS_RESERVE02 = "API_CUS_RESERVE02";

    public static final String API_CUS_RESERVE03 = "API_CUS_RESERVE03";

    public static final String API_CUS_RESERVE04 = "API_CUS_RESERVE04";

    public static final String API_CUS_RESERVE05 = "API_CUS_RESERVE05";

    public static final String API_CUS_RESERVE06 = "API_CUS_RESERVE06";

    public static final String API_CUS_RESERVE07 = "API_CUS_RESERVE07";

    public static final String API_CUS_RESERVE08 = "API_CUS_RESERVE08";

    public static final String API_CUS_RESERVE09 = "API_CUS_RESERVE09";

    public static final String API_CUS_RESERVE10 = "API_CUS_RESERVE10";

    public static final String API_CUS_DATA_SOURCE = "API_CUS_DATA_SOURCE";

    public static final String API_CUS_REQUEST_NO = "API_CUS_REQUEST_NO";

    public static final String API_CUS_CONSUME_FLAG = "API_CUS_CONSUME_FLAG";

    public static final String API_CUS_CREATE_USER = "API_CUS_CREATE_USER";

    public static final String API_CUS_CREATE_DATE = "API_CUS_CREATE_DATE";

}
